package de.tum.in.eist.poll.client;

import junit.framework.TestCase;

import de.tum.in.eist.poll.shared.Validation;

public class LoginValidationTestCase extends TestCase
{
	/**
	 * Test the Validation
	 */
	public void testSimple()
	{
		// Wrong name -> Input must be digits only
		assertFalse(Validation.isValidStudentLogin("Hans Stinkel-Winkelminkelhuber"));
		
		// Too many digits
		assertFalse(Validation.isValidStudentLogin("98239823489329823"));
		
		// Too few digits
		assertFalse(Validation.isValidStudentLogin("983"));
		
		// Not only digits
		assertFalse(Validation.isValidStudentLogin("9999999g"));
		
		// Valid input
		assertTrue(Validation.isValidStudentLogin("01234567"));
	}
	
}
